import random


def gj(HP, ATK, DEF, CRT, NUMBER, boss, boss_DEF, boss_ATK):
    number = random.randint(0, 100)
    print(f"boss生命值{boss},防御力{boss_DEF}")
    oneSh = 0
    sh = ATK
    boss_surplus_hp = 0
    my_surplus_hp = HP
    my_sh = boss_ATK
    if number <= CRT:
        oneSh += (ATK * 2)
        print(f'你触发了暴击伤害!,单次伤害{oneSh}', end='')
        sh += (my_gjl * 2) * my_cs - boss_DEF
        boss_surplus_hp += boss - sh
        print(f"对boss造成了{sh}点伤害,boss生命值剩余{boss_surplus_hp}")
        if boss_surplus_hp >= 500:
            print(f"boss生命值剩余{boss_surplus_hp}")
            my_sh = boss_ATK - DEF
            my_surplus_hp = my_surplus_hp - my_sh
            print(f"你受到{my_sh}点伤害,剩余{my_surplus_hp}")
            return my_surplus_hp
        if boss_surplus_hp <= 350:
            print(f"boss生命值剩余{boss_surplus_hp}")
            my_sh = (boss_ATK * 2) - DEF
            my_surplus_hp = my_surplus_hp - my_sh
            print(f"你受到{my_sh}点伤害,剩余{my_surplus_hp}")
            return my_surplus_hp
    else:
        sh += (my_gjl * my_cs) - boss_DEF
        boss_surplus_hp = boss - sh
        print(f"你对boss造成{sh}点伤害,boss剩余{boss_surplus_hp}")
        if boss_surplus_hp >= 501:
            print(f"boss生命值剩余{boss_surplus_hp}")
            my_sh = boss_ATK - DEF
            my_surplus_hp = my_surplus_hp - my_sh
            print(f"你受到{my_sh}点伤害,剩余{my_surplus_hp}")
            return my_surplus_hp
        if boss_surplus_hp <= 350:
            print(f"boss生命值剩余{boss_surplus_hp}")
            my_sh = (boss_ATK * 2) - DEF
            my_surplus_hp = my_surplus_hp - my_sh
            print(f"你受到{my_sh}点伤害,剩余{my_surplus_hp}")
            return my_surplus_hp


my_hp = 250
my_gjl = 70
my_bjl = 0
my_fyl = 150
my_cs = int(input("输入你的攻击次数"))
gj(HP=my_hp, ATK=my_gjl, CRT=my_bjl, DEF=my_fyl, NUMBER=my_cs, boss=1500, boss_DEF=150, boss_ATK=350)

print(2)
